home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / answrbok / 5_5.lha / 5_5 / 5_5c3a.h < prev    next >
Text File  |  1993-08-08  |  871b  |  42 lines

  1. * Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
  2. * The C++ Answer Book */
  3. * Tony Hansen */
  4. * All rights reserved. */
  5. * Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
  6. * The C++ Answer Book */
  7. * Tony Hansen */
  8. * All rights reserved. */
  9. * Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
  10. * The C++ Answer Book */
  11. * Tony Hansen */
  12. * All rights reserved. */
  13. / intalloc.h
  14. / allocate and deallocate a number
  15. / from an integer set
  16.  
  17. ifndef INTALLOC_H
  18.  define INTALLOC_H
  19.  
  20. ifdef NONLOCAL        /* DELETE */
  21. include <intset.h>
  22. else        /* DELETE */
  23. include "intset.h"    /* DELETE */
  24. endif        /* DELETE */
  25.  
  26. lass intalloc
  27.  
  28.    intset *a;
  29.  
  30. ublic:
  31.    intalloc(int m, int n) { a = new intset(m, n); }
  32.    ~intalloc() { delete a; }
  33.  
  34.    int get();
  35.    
  36.    void free(int i)
  37.    {
  38.        a->remove(i);
  39.    }
  40. ;
  41. endif /* INTALLOC_H */
  42.